Skip to content

refactor(tron-wallet-snap): rename SNAP_SPECIAL_ASSETS to SNAP_OWNED_ASSETS - #92

Draft
ulissesferreira wants to merge 13 commits into
WPN-1497-snap-adapterfrom
WPN-1497-snap-owned-helpers
Draft

refactor(tron-wallet-snap): rename SNAP_SPECIAL_ASSETS to SNAP_OWNED_ASSETS#92
ulissesferreira wants to merge 13 commits into
WPN-1497-snap-adapterfrom
WPN-1497-snap-owned-helpers

Conversation

@ulissesferreira

@ulissesferreira ulissesferreira commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add SNAP_OWNED_ASSETS constant (with deprecated SPECIAL_ASSETS alias)
  • Add isSnapOwnedAsset() helper and unit tests
  • Update price/token API clients to use the new constant name

Jira

Test plan

  • yarn workspace @metamask/tron-wallet-snap build
  • yarn workspace @metamask/tron-wallet-snap run test

Stacks on #91 (Step 3/3 shared spine). Merge before choosing Fork X or Y.

@ulissesferreira
ulissesferreira requested a review from a team as a code owner July 31, 2026 21:38
@ulissesferreira
ulissesferreira force-pushed the WPN-1497-snap-adapter branch from 53be776 to b517134 Compare July 31, 2026 21:54
@ulissesferreira ulissesferreira changed the title refactor(tron-wallet-snap): add SNAP_OWNED_ASSETS and isSnapOwnedAsset (WPN-1497) refactor(tron-wallet-snap): rename SNAP_SPECIAL_ASSETS to SNAP_OWNED_ASSETS Jul 31, 2026
@ulissesferreira
ulissesferreira force-pushed the WPN-1497-snap-owned-helpers branch from b67ea64 to 8624473 Compare July 31, 2026 22:18
@ulissesferreira
ulissesferreira marked this pull request as draft August 2, 2026 17:39
@ulissesferreira
ulissesferreira force-pushed the WPN-1497-snap-owned-helpers branch from b8e5fa7 to d5876a7 Compare August 2, 2026 20:48
ulissesferreira and others added 13 commits August 3, 2026 00:19
Pure organizational move with import path updates only. No AssetsService
API renames or behavior changes.
Align public reader names with the final AssetsController-oriented API:
getAccountAssets, getAccountAssetsByIDs, getAccountAssetByID.
Handler folder move requires importing from ../cronjob/cronjob rather
than the bare folder path so the Snap bundle resolves correctly.
Handler files moved into subfolders in WPN-1497, so point eslint
suppressions at the new paths and refresh snap.manifest.json after
the handler import path fix changed the bundle hash.
…rvice

Move existing assets logic into SnapAssetsAdapter and keep AssetsService as a
thin facade that always delegates to the Snap adapter. Behavior unchanged;
prepares for a later Core adapter / feature-flag routing PR.
Adapter lives one directory deeper than AssetsService; bump client,
constants, and types imports to ../../../ and ../types respectively.
Update the manifest shasum, cover AssetsService facade delegation in tests,
and use SnapAssetsAdapter.isFiat inside the adapter implementation.
Move import suppressions to SnapAssetsAdapter and align test assertions
with jest prefer-strict-equal rules.
The previous shasum was generated on macOS and did not match the bundle
produced by CI on Linux, causing dirty-working-tree failures in build and test.
Co-authored-by: Cursor <cursoragent@cursor.com>
Align test file formatting with lint:misc:check expectations.
@cursor
cursor Bot force-pushed the WPN-1497-snap-adapter branch 2 times, most recently from a6cbab4 to e34f69c Compare August 4, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant